<%--
  Created by IntelliJ IDEA.
  User: Li Chuanwei
  Date: 2023-07-18
  Time: 2:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>订单支付</title>
</head>
<body>
<form name=alipayment action="${pageContext.request.contextPath}/aliPayQuickPay" method=post
      target="_blank">
  <div id="body1" class="show" name="divcontent">
    <dl class="content">
      <dt>商户订单号 ：</dt>
      <dd>
        <input id="orderNo" name="orderNo" value="${orderNo}" readonly/>
      </dd>
      <hr class="one_line">
      <dt>订单名称 ：</dt>
      <dd>
        <input id="orderSubject" name="orderSubject" value="${orderSubject}" readonly/>
      </dd>
      <hr class="one_line">
      <dt>付款金额 ：</dt>
      <dd>
        <input id="orderAmt" name="orderAmt" value="${orderAmt}" readonly/>
      </dd>
      <hr class="one_line">
      <dt>商品描述：</dt>
      <dd>
        <input id="businessDesc " name="businessDesc" value="${businessDesc}" readonly />
      </dd>
      <hr class="one_line">
      <dt></dt>
      <dd id="btn-dd">
    						<span class="new-btn-login-sp">
    							<button class="new-btn-login" type="submit"
                                        style="text-align: center;">付 款</button>
                              <button class="new-btn-login"
                                      style="text-align: center;" onclick="paySuccess(event)">支付完成</button>
    						</span> <span class="note-help">如果您点击“付款”按钮，即表示您同意该次的执行操作。</span>
      </dd>
    </dl>
  </div>
</form>
<script>
  function paySuccess(event){
    event.preventDefault(); // 阻止表单提交
    window.location.href = "${pageContext.request.contextPath}/user_orderDetails?userIds=" + ${sessionScope.user.getId()};
    return false;
  }
</script>
</body>
</html>
